The system prompt defines the assistant's permanent instructions and behavior, while user messages represent the specific, temporary inputs from the user.
The fundamental difference between a system prompt and a user message is their purpose and persistence in the conversation. The system prompt (or system message) is a high-level instruction set provided by the developer to define the assistant's role, personality, constraints, and behavior. It is meant to be a persistent guide for the entire conversation and is typically not visible to the end-user . It can include rules, formatting instructions, and safety guardrails that the model should always follow .
A user message, conversely, represents the specific, immediate input from the person interacting with the assistant. It changes with every turn of the conversation and operates within the boundaries established by the system prompt . The model interprets the user message as a task or question to be addressed while adhering to its core programming from the system prompt. This separation allows developers to update the assistant's core behavior without changing the application's core logic and prevents users from accidentally (or intentionally) overriding the assistant's fundamental instructions .